{if not isset($iteration)}{assign var="iteration" value=1}{/if}

<ul{if 1 == $iteration} class="jd_menu"{/if}>
{foreach from=$entries item="item" name="categories"}
    
    {if 1 == $iteration and not $smarty.foreach.categories.first}
        <li><span id="separator_menu"><img height="8" width="2" alt="" src="images/separator.gif"></span></li>
    {/if}
    <li>
        <a href="photo/{$item.url}" class="{if $item.active and 1 == $iteration}yellow{else}white{/if}">
            {if 1 == $iteration}
                {$item.name|escape|utf8_lowercase}
            {else}
                {$item.name|escape}
            {/if}
        </a>
        {if $iteration > 1 and $item.children|@count > 0}
        &raquo;
        {/if}
        {if $item.children|@count > 0}
            {include file="_menu/default/categories.tpl" entries=$item.children iteration=`$iteration+1`}
        {/if}
    </li>

{/foreach}
</ul>
